<div class="row justify-content-center">
    <div class="col-8">
        <form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
            <h2 id="jhi-order-heading">Create or edit a Order</h2>

            <div>
                <jhi-alert-error></jhi-alert-error>

                <div class="form-group" [hidden]="!editForm.get('id')!.value">
                    <label for="id">ID</label>
                    <input type="text" class="form-control" id="id" name="id" formControlName="id" readonly />
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_orderCode">Order Code</label>
                    <input type="text" class="form-control" name="orderCode" id="field_orderCode"
                           formControlName="orderCode"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_orderTime">Order Time</label>
                    <div class="d-flex">
                        <input id="field_orderTime" type="datetime-local" class="form-control" name="orderTime" formControlName="orderTime" placeholder="YYYY-MM-DD HH:mm"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_cancelTime">Cancel Time</label>
                    <div class="d-flex">
                        <input id="field_cancelTime" type="datetime-local" class="form-control" name="cancelTime" formControlName="cancelTime" placeholder="YYYY-MM-DD HH:mm"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_dealTime">Deal Time</label>
                    <div class="d-flex">
                        <input id="field_dealTime" type="datetime-local" class="form-control" name="dealTime" formControlName="dealTime" placeholder="YYYY-MM-DD HH:mm"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_sendTime">Send Time</label>
                    <div class="d-flex">
                        <input id="field_sendTime" type="datetime-local" class="form-control" name="sendTime" formControlName="sendTime" placeholder="YYYY-MM-DD HH:mm"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_marginTime">Margin Time</label>
                    <div class="d-flex">
                        <input id="field_marginTime" type="datetime-local" class="form-control" name="marginTime" formControlName="marginTime" placeholder="YYYY-MM-DD HH:mm"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_payTime">Pay Time</label>
                    <div class="d-flex">
                        <input id="field_payTime" type="datetime-local" class="form-control" name="payTime" formControlName="payTime" placeholder="YYYY-MM-DD HH:mm"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_checkedTime">Checked Time</label>
                    <div class="d-flex">
                        <input id="field_checkedTime" type="datetime-local" class="form-control" name="checkedTime" formControlName="checkedTime" placeholder="YYYY-MM-DD HH:mm"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_userId">User Id</label>
                    <input type="number" class="form-control" name="userId" id="field_userId"
                           formControlName="userId"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_itemTypeId">Item Type Id</label>
                    <input type="number" class="form-control" name="itemTypeId" id="field_itemTypeId"
                           formControlName="itemTypeId"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_itemId">Item Id</label>
                    <input type="number" class="form-control" name="itemId" id="field_itemId"
                           formControlName="itemId"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_orderPrice">Order Price</label>
                    <input type="number" class="form-control" name="orderPrice" id="field_orderPrice"
                           formControlName="orderPrice"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_dealPrice">Deal Price</label>
                    <input type="number" class="form-control" name="dealPrice" id="field_dealPrice"
                           formControlName="dealPrice"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_isLockPrice">Is Lock Price</label>
                    <input type="checkbox" class="form-control" name="isLockPrice" id="field_isLockPrice"
                           formControlName="isLockPrice"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_states">States</label>
                    <select class="form-control" name="states" formControlName="states" id="field_states">
                        <option value="WAIT_MARGIN">WAIT_MARGIN</option>
                        <option value="WAIT_SEND">WAIT_SEND</option>
                        <option value="WAIT_RECEIVED">WAIT_RECEIVED</option>
                        <option value="WAIT_PAY">WAIT_PAY</option>
                        <option value="WAIT_COMFIRM">WAIT_COMFIRM</option>
                        <option value="SUCCEED">SUCCEED</option>
                        <option value="CANCEL_BY_CLIENT">CANCEL_BY_CLIENT</option>
                        <option value="CANCEL_BY_TIMEOUT">CANCEL_BY_TIMEOUT</option>
                        <option value="CANCEL_BY_CHECK">CANCEL_BY_CHECK</option>
                        <option value="CANCEL_BY_PRICE">CANCEL_BY_PRICE</option>
                    </select>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_estimatesQty">Estimates Qty</label>
                    <input type="number" class="form-control" name="estimatesQty" id="field_estimatesQty"
                           formControlName="estimatesQty"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_dealQty">Deal Qty</label>
                    <input type="number" class="form-control" name="dealQty" id="field_dealQty"
                           formControlName="dealQty"/>
                </div>
            </div>

            <div>
                <button type="button" id="cancel-save" class="btn btn-secondary" (click)="previousState()">
                    <fa-icon icon="ban"></fa-icon>&nbsp;<span>Cancel</span>
                </button>

                <button type="submit" id="save-entity" [disabled]="editForm.invalid || isSaving" class="btn btn-primary">
                    <fa-icon icon="save"></fa-icon>&nbsp;<span>Save</span>
                </button>
            </div>
        </form>
    </div>
</div>
